<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>员工详情</title> <!-- 显示员工的详细信息页面标题 -->
    <style>
        /* 内部CSS样式定义 */
        body {
            font-family: Arial, sans-serif;
            background-color: #f4f4f4;
            margin: 0;
            padding: 0;
        }
        .container {
            max-width: 600px;
            margin: 50px auto;
            padding: 20px;
            background-color: #fff;
            border-radius: 8px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }
        h2 {
            text-align: center;
        }
        .employee-details {
            margin-top: 20px;
        }
        .employee-details p {
            line-height: 1.6;
        }
        .label {
            font-weight: bold;
        }
    </style>
</head>
<body>
<div class="container">
    <h2>员工详情</h2>
    <div class="employee-details">
        <!-- 显示员工的详细信息 -->
        <p><span class="label">员工 ID：</span><span th:text="${employee.id}">1</span></p>
        <p><span class="label">姓名：</span><span th:text="${employee.name}">张三</span></p>
        <p><span class="label">职位：</span><span th:text="${employee.job}">经理</span></p>
        <p><span class="label">工资：</span><span th:text="${employee.salary}">8000</span></p>

        <!-- 如果有领导信息，显示领导信息 -->
        <div th:if="${employee.leader != null}">
            <p><span class="label">领导姓名：</span><span th:text="${employee.leader.name}">李四</span></p>
            <p><span class="label">领导职位：</span><span th:text="${employee.leader.job}">技术主管</span></p>
        </div>
        <!-- 如果没有领导信息，显示“无领导” -->
        <div th:if="${employee.leader == null}">
            <p><span class="label">领导：</span>无</p>
        </div>
    </div>
</div>
</body>
</html>
